import { Pipe, PipeTransform } from '@angular/core';
@Pipe({name: 'toDate'})
export class ToDatePipe implements PipeTransform {
  transform(value: number): any {
    let newdate = new Date();
    let date;
    newdate.setTime( value * 1000);
    date = newdate.toJSON();
    return date;
  }
}
